﻿@model IEnumerable<IGrouping<string, QizSessionDetail>>
@{
    ViewBag.Title = "对比分析";

    var xv = Model.Select(v => v.Key).ToArray();
    var yv = Model.Select(v => v.Count()).ToArray();
    Response.Clear();
    var title = ViewBag.ItemTitle;
    var chart = new Chart(width: 940, height: 450)
    .AddLegend()
    .AddSeries(name: title, chartType: "Pie",
    xValue: xv,
    yValues: yv
    )
    .AddTitle(title + "趋势分析")

    .Write(format: "Png");

    Response.Flush();
    Response.End();
}